
%% initialize
clear all;
close all;

% rank-ordered logits

load '../../01_data/05_temp/mixed_logit_principal_totVA_extraX'

rawdata = csvread('../../01_data/05_temp/rank_ordered_logit_all.csv');

thetahat(1) = 0;
thetahat(end) = 0;

thetahat(2:end-1) = rawdata';

clearvars rawdata;

save -v7.3 '../../01_data/05_temp/mixed_logit_principal_totVA_DISAD_ro_all'

clear

load '../../01_data/05_temp/mixed_logit_principal_totVA_extraX'

rawdata = csvread('../../01_data/05_temp/rank_ordered_logit_restricted.csv');

thetahat(1) = 0;
thetahat(end) = 0;

thetahat(2:end-1) = rawdata';

clearvars rawdata;

save -v7.3 '../../01_data/05_temp/mixed_logit_principal_totVA_DISAD_ro_restricted'

% binary logits

clear
load '../../01_data/05_temp/mixed_logit_rc6_totVA_DISAD_Ndis'
rawdata = csvread('../../01_data/05_temp/binary_logit1.csv');
thetahat_commute = rawdata(1,1);
xb = rawdata(:,2);
clearvars rawdata;
save -v7.3 '../../01_data/05_temp/mixed_logit_rc6_totVA_logit1'

clear
load '../../01_data/05_temp/mixed_logit_rc6_totVA_DISAD_Ndis'
rawdata = csvread('../../01_data/05_temp/binary_logit2.csv');
thetahat_commute = rawdata(1,1);
xb = rawdata(:,2);
clearvars rawdata;
save -v7.3 '../../01_data/05_temp/mixed_logit_rc6_totVA_logit2'

clear
load '../../01_data/05_temp/mixed_logit_rc6_totVA_DISAD_Ndis'
rawdata = csvread('../../01_data/05_temp/binary_logit3.csv');
thetahat_commute = rawdata(1,1);
xb = rawdata(:,2);
clearvars rawdata;
save -v7.3 '../../01_data/05_temp/mixed_logit_rc6_totVA_logit3'




